package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/12/25 15:59
 **/
@Getter
@AllArgsConstructor
public enum StatisticsTypeEnum {
    PLAY(0, "播放"),
    FANS(1, "粉丝"),
    LIKES(2, "点赞"),
    COLLECTIONS(3, "收藏"),
    COIN(4, "投币"),
    COMMENTS(5, "评论"),
    DANMU(6, "弹幕"),
    ;

    private Integer type;

    private String desc;

    public static StatisticsTypeEnum getByType(Integer type) {
        for (StatisticsTypeEnum statisticsTypeEnum : StatisticsTypeEnum.values()) {
            if (statisticsTypeEnum.getType().equals(type)) {
                return statisticsTypeEnum;
            }
        }
        return null;
    }
}
